package com.kgame5.xtank3d.model.ground {
import kgame5.enginex.enum.Layer3DEnum;
import kgame5.enginex.part.GViewComp;
import kgame5.k3d.core.obj3d.node3d.Node3D;

import com.kgame5.xtank3d.resource.ResourceManagerX;
import com.kgame5.xtank3d.vo.GroundVO;

/**
 * @author kk
 * 构造一个即可，封装视图组件md(md就是个纯粹的模型)的逻辑。
 * 
 * 注意模型是顶面中心在世界中心。需要调整到模型左上角在世界中心
 */
public class GroundViewComp extends GViewComp{
	
	private var md:Node3D;
	
	public function GroundViewComp(vo:GroundVO){
		md=ResourceManagerX.getInstance().getGround(vo);
		md.layerID = Layer3DEnum.LAYER_GROUND;//千万要加上这个
		
		//md.getDO().cacheAsBitmap;
		//md.getDO().opaqueBackground=true;
	}
	
	override public function getNode3D():Node3D{
		return md;
	}
	
	public function move(x:int,y:int,z:int):void{
		md.x=x;
		md.y=y;
		md.z=z;
	}
	
	//update
	//dispose
}
}
